<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Dashboard Template for Bootstrap</title>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <h2>添加员工</h2>
            <div class="table-responsive">
                <form th:action="@{/provider/save}" method="POST">
                    <input type="hidden" name="_method" value="put" th:if="${provider != null}"/>
                    <input type="hidden" name="id" th:value="${provider.id}" th:if="${provider != null}"/>

                    <div class="form-group">
                        <label>供应商编码</label>
                        <input type="text" name="proCode" class="form-control"
                               th:value="${provider != null} ? ${provider.proCode}">
                    </div>
                    <div class="form-group">
                        <label>供应商名称</label>
                        <input type="text" name="proName" class="form-control"
                               th:value="${provider != null} ? ${provider.proName}">
                    </div>
                    <div class="form-group">
                        <label>供应商详细描述</label>
                        <input type="text" name="proDesc" class="form-control"
                               th:value="${provider != null} ? ${provider.proDesc}">
                    </div>
                    <div class="form-group">
                        <label>供应商联系人</label>
                        <input type="text" name="proContact" class="form-control"
                               th:value="${provider != null} ? ${provider.proContact}">
                    </div>
                    <div class="form-group">
                        <label>联系电话</label>
                        <input type="text" name="proPhone" class="form-control"
                               th:value="${provider != null} ? ${provider.proPhone}">
                    </div>
                    <div class="form-group">
                        <label>地址</label>
                        <input type="text" name="proAddress" class="form-control"
                               th:value="${provider != null} ? ${provider.proAddress}">
                    </div>
                    <div class="form-group">
                        <label>传真</label>
                        <input type="text" name="proFax" class="form-control"
                               th:value="${provider != null} ? ${provider.proFax}">
                    </div>
                    <div class="form-group">
                        <label>创建者</label>
                        <input type="text" name="createdBy" class="form-control"
                               th:value="${provider != null} ? ${provider.createdBy}">
                    </div>
                    <div class="form-group">
                        <label>创建时间</label>
                        <input type="text" name="creationDate" class="form-control"
                               th:value="${provider != null} ? ${#dates.format(provider.creationDate,'yyyy-MM-dd HH:mm:ss')}">
                    </div>
                    <div class="form-group">
                        <label>更新时间</label>
                        <input type="text" name="modifyDate" class="form-control"
                               th:value="${provider != null} ? ${#dates.format(provider.modifyDate,'yyyy-MM-dd HH:mm:ss')}">
                    </div>
                    <div class="form-group">
                        <label>更新者</label>
                        <input type="text" name="modifyBy" class="form-control"
                               th:value="${provider != null} ? ${provider.modifyBy}">
                    </div>
                    <button type="submit" th:text="${provider != null} ? '修改' : '添加'" class="btn btn-primary">添加</button>
                </form>
            </div>
        </main>
    </div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" th:src="@{/asserts/js/jquery-3.2.1.slim.min.js}"></script>
<script type="text/javascript" th:src="@{/asserts/js/popper.min.js}"></script>
<script type="text/javascript" th:src="@{/asserts/js/bootstrap.min.js}"></script>
<!-- Icons -->
<script type="text/javascript" th:src="@{/asserts/js/feather.min.js}"></script>
<script>
    feather.replace()
</script>
<!-- Graphs -->
<script type="text/javascript" th:src="@{/asserts/js/Chart.min.js}"></script>
<script>
    var ctx = document.getElementById("myChart");
    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
            datasets: [{
                data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
                lineTension: 0,
                backgroundColor: 'transparent',
                borderColor: '#007bff',
                borderWidth: 4,
                pointBackgroundColor: '#007bff'
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero: false
                    }
                }]
            },
            legend: {
                display: false,
            }
        }
    });
</script>
</body>
</html>